for (int c0 = 3993; c0 <= 63893; c0 += 1)
  if (2 * c0 - 3993 * ((3 * c0 + 5990) / 5990) >= 0)
    for (int c4 = -c0 + 1997 * ((3 * c0 + 5990) / 5990) + 1; c4 <= 12; c4 += 1)
      S_3(c4, -c0 + 1997 * (3 * c0 / 5990) + 1997, 2 * c0 - 3993 * (3 * c0 / 5990) - 3993);
